<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-CN">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">
<meta name="baidu-site-verification" content="code-Vc9hmj7JE9" />
<meta name="google-site-verification" content="tMVEtTlHbEdIEga44DZi47Yu8Pl2shFKVZcqz6rfSW0" />
<script>
    (function () {
        if ('') {
            if (prompt('请输入文章密码') !== '') {
                alert('密码错误！');
                if (history.length === 1) {
                    location.replace("https://kun-bin.github.io/");
                } else {
                    history.back();
                }
            }
        }
    })();
</script>








<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="/css/matery.css">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="游戏相关,ck3,mod," />










<meta name="description" content="这是对CK3的wiki中的事件模组的简要翻译。">
<meta property="og:type" content="article">
<meta property="og:title" content="ck3mod制作笔记-4">
<meta property="og:url" content="https://likun1208.github.io/2020/11/08/ck3mod%E5%88%B6%E4%BD%9C%E7%AC%94%E8%AE%B0-4/index.html">
<meta property="og:site_name" content="左边">
<meta property="og:description" content="这是对CK3的wiki中的事件模组的简要翻译。">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2020/11/08/GlaYmiW15KjkUzF.png">
<meta property="article:published_time" content="2020-11-08T03:48:18.000Z">
<meta property="article:modified_time" content="2021-01-31T12:09:45.297Z">
<meta property="article:author" content="Kun Li">
<meta property="article:tag" content="游戏相关">
<meta property="article:tag" content="ck3">
<meta property="article:tag" content="mod">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2020/11/08/GlaYmiW15KjkUzF.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"always","offset":12,"b2t":false,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://likun1208.github.io/2020/11/08/ck3mod制作笔记-4/"/>





  <title>ck3mod制作笔记-4 | 左边</title>
  








<meta name="generator" content="Hexo 4.2.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">左边</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            Search
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="Searching..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>
	<script type="text/javascript" src="/js/echarts.min.js"></script>
    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://likun1208.github.io/2020/11/08/ck3mod%E5%88%B6%E4%BD%9C%E7%AC%94%E8%AE%B0-4/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Kun Li">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/images/header.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="左边">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">ck3mod制作笔记-4</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2020-11-08T11:48:18+08:00">
                2020-11-08
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">In</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/CK3/" itemprop="url" rel="index">
                    <span itemprop="name">CK3</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          
              <div class="post-description">
                  这是对CK3的wiki中的事件模组的简要翻译。
              </div>
          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="事件模组"><a href="#事件模组" class="headerlink" title="事件模组"></a>事件模组</h1><p><a href="https://ck3.paradoxwikis.com/Event_modding" target="_blank" rel="noopener">链接</a></p>
<h2 id="位置"><a href="#位置" class="headerlink" title="位置"></a>位置</h2><p>事件在<code>events</code>文件夹下的<code>.txt</code>文件中。</p>
<h2 id="结构"><a href="#结构" class="headerlink" title="结构"></a>结构</h2><p>整体结构与<a href="https://ck2.paradoxwikis.com/Event_modding" target="_blank" rel="noopener">CK2</a>的事件很相似，但是对语法进行了一些调整，并增加了大量额外的功能，其中许多功能是可选的。此处将介绍每个事件所必须的部分，并在稍后部分中单独介绍其他内容。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">example.1 &#x3D; &#123;</span><br><span class="line">	desc &#x3D; example.1.desc</span><br><span class="line">	</span><br><span class="line">	option &#x3D; &#123;</span><br><span class="line">		name &#x3D; example.1.a</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>写好该mod并加载，即可在游戏中的控制台输入<code>event triggers [example.1]</code>来触发该事件。</p>
<h3 id="ID和命名空间"><a href="#ID和命名空间" class="headerlink" title="ID和命名空间"></a>ID和命名空间</h3><p>ID是事件独一无二的标志。</p>
<h3 id="标识"><a href="#标识" class="headerlink" title="标识"></a>标识</h3><p>这些是确定事件种类和外观的顶级变量。它们具有有限的值集。</p>
<div class="table-container">
<table>
<thead>
<tr>
<th>Flag</th>
<th>Meaning</th>
<th>Possible values</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>事件类型，决定root的范围。</td>
<td>* character_event none (when an event doesn’t use the root scope at all)</td>
</tr>
<tr>
<td>hidden</td>
<td>如果设置为true，则该事件不会显示出来，只会在后台触发。可用于执行与玩家不立即相关的维护事件。</td>
<td>true, false</td>
</tr>
</tbody>
</table>
</div>
<h2 id="画像"><a href="#画像" class="headerlink" title="画像"></a>画像</h2><h3 id="画像位置"><a href="#画像位置" class="headerlink" title="画像位置"></a>画像位置</h3><div class="table-container">
<table>
<thead>
<tr>
<th>Portrait Position</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>left_portrait</td>
<td>出现在事件场景的左边。</td>
</tr>
<tr>
<td>right_portrait</td>
<td>出现在事件场景的右边。</td>
</tr>
<tr>
<td>lower_left_portrait</td>
<td>出现在事件场景的左下方。</td>
</tr>
<tr>
<td>lower_center_portrait</td>
<td>出现在事件场景的中下方。</td>
</tr>
<tr>
<td>lower_right_portrait</td>
<td>出现在事件场景的右下方。</td>
</tr>
</tbody>
</table>
</div>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">example_event.1001 &#x3D; &#123;</span><br><span class="line">	left_portrait &#x3D; &#123;</span><br><span class="line">		character &#x3D; ROOT # 无论是什么角色，都显示在此事件窗口位置，显示所选的动画。</span><br><span class="line">		animation &#x3D; fear # 请注意，具有某些遗传特征（例如，巨人主义、侏儒主义）的角色更改其角色模型具有不同的动画，如果将其中一个动画分配给没有该模型的角色，则可能会发生崩溃。</span><br><span class="line">	&#125;</span><br><span class="line">	right_portrait &#x3D; &#123;</span><br><span class="line">		character &#x3D; ROOT</span><br><span class="line">		animation &#x3D; scheme</span><br><span class="line">	&#125;</span><br><span class="line">	lower_left_portrait &#x3D; &#123;</span><br><span class="line">		character &#x3D; ROOT</span><br><span class="line">	&#125;</span><br><span class="line">	lower_center_portrait &#x3D; &#123;</span><br><span class="line">		character &#x3D; ROOT</span><br><span class="line">	&#125;</span><br><span class="line">	lower_right_portrait &#x3D; &#123;</span><br><span class="line">		character &#x3D; ROOT</span><br><span class="line">	&#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这段mod所对应的事件如下图所示。</p>
<p><img src="https://i.loli.net/2020/11/08/GlaYmiW15KjkUzF.png" alt="img"></p>
<h3 id="动画"><a href="#动画" class="headerlink" title="动画"></a>动画</h3><div class="table-container">
<table>
<thead>
<tr>
<th>Animation</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>happiness</td>
<td>dismissal</td>
<td>prison_dungeon</td>
<td>admiration</td>
</tr>
<tr>
<td>disgust</td>
<td>schadenfreude</td>
<td>stress</td>
<td>personality_compassionate</td>
</tr>
<tr>
<td>pain</td>
<td>ecstasy</td>
<td>fear</td>
<td>rage</td>
</tr>
<tr>
<td>anger</td>
<td>flirtation_left</td>
<td>shame</td>
<td>boredom</td>
</tr>
<tr>
<td>shock</td>
<td>worry</td>
<td>scheme</td>
<td>personality_bold</td>
</tr>
<tr>
<td>personality_callous</td>
<td>personality_irrational</td>
<td>personality_content</td>
<td>flirtation</td>
</tr>
<tr>
<td>disbelief</td>
<td>personality_cynical</td>
<td>personality_rational</td>
<td>personality_dishonorable</td>
</tr>
<tr>
<td>idle</td>
<td>paranoia</td>
<td>personality_vengeful</td>
<td>disapproval</td>
</tr>
<tr>
<td>sick</td>
<td>beg</td>
<td>personality_zealous</td>
<td>newborn</td>
</tr>
<tr>
<td>love</td>
<td>sadness</td>
<td>personality_honorable</td>
<td>personality_forgiving</td>
</tr>
<tr>
<td>personality_greedy</td>
<td>personality_coward</td>
<td>severelyinjured</td>
<td>severelywounded</td>
</tr>
<tr>
<td>war_attacker</td>
<td>war_defender</td>
<td>war_over_win</td>
<td>grief</td>
</tr>
</tbody>
</table>
</div>
<h3 id="主题"><a href="#主题" class="headerlink" title="主题"></a>主题</h3><div class="table-container">
<table>
<thead>
<tr>
<th>Theme</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>abduct_scheme</td>
<td>alliance</td>
<td>bastardy</td>
<td>battle</td>
</tr>
<tr>
<td>befriend_scheme</td>
<td>claim_throne_scheme</td>
<td>corruption</td>
<td>crown</td>
</tr>
<tr>
<td>culture_change</td>
<td>death</td>
<td>default</td>
<td>diplomacy</td>
</tr>
<tr>
<td>diplomacy_family_focus</td>
<td>diplomacy_foreign_affairs_focus</td>
<td>diplomacy_majesty_focus</td>
<td>dread</td>
</tr>
<tr>
<td>dungeon</td>
<td>dynasty</td>
<td>education</td>
<td>fabricate_hook_scheme</td>
</tr>
<tr>
<td>faith</td>
<td>family</td>
<td>feast_activity</td>
<td>friend_relation</td>
</tr>
<tr>
<td>friendly</td>
<td>generic_intrigue_scheme</td>
<td>healthcare</td>
<td>hunt_activity</td>
</tr>
<tr>
<td>hunting</td>
<td>intrigue</td>
<td>intrigue_intimidation_focus</td>
<td>intrigue_skulduggery_focus</td>
</tr>
<tr>
<td>intrigue_temptation_focus</td>
<td>learning</td>
<td>learning_medicine_focus</td>
<td>learning_scholarship_focus</td>
</tr>
<tr>
<td>learning_theology_focus</td>
<td>love</td>
<td>lover_relation</td>
<td>marriage</td>
</tr>
<tr>
<td>martial</td>
<td>martial_authority_focus</td>
<td>martial_chivalry_focus</td>
<td>martial_strategy_focus</td>
</tr>
<tr>
<td>medicine</td>
<td>mental_break</td>
<td>mental_health</td>
<td>murder_scheme</td>
</tr>
<tr>
<td>party</td>
<td>pet</td>
<td>physical_health</td>
<td>pilgrimage_activity</td>
</tr>
<tr>
<td>pregnancy</td>
<td>prison</td>
<td>realm</td>
<td>recovery</td>
</tr>
<tr>
<td>rival_relation</td>
<td>romance_scheme</td>
<td>secret</td>
<td>seduce_scheme</td>
</tr>
<tr>
<td>seduction</td>
<td>skull</td>
<td>stewardship</td>
<td>stewardship_domain_focus</td>
</tr>
<tr>
<td>stewardship_duty_focus</td>
<td>stewardship_wealth_focus</td>
<td>sway_scheme</td>
<td>unfriendly</td>
</tr>
<tr>
<td>vassal</td>
<td>war</td>
<td>witchcraft</td>
</tr>
</tbody>
</table>
</div>
<h4 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h4><div class="table-container">
<table>
<thead>
<tr>
<th>Background</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>alley_day</td>
<td>alley_night</td>
<td>armory</td>
<td>army_camp</td>
</tr>
<tr>
<td>battlefield</td>
<td>bedchamber</td>
<td>burning_building</td>
<td>corridor_day</td>
</tr>
<tr>
<td>corridor_night</td>
<td>council_chamber</td>
<td>courtyard</td>
<td>docks</td>
</tr>
<tr>
<td>dungeon</td>
<td>farmland</td>
<td>feast</td>
<td>gallows</td>
</tr>
<tr>
<td>garden</td>
<td>market</td>
<td>market_east</td>
<td>market_india</td>
</tr>
<tr>
<td>market_tribal</td>
<td>market_west</td>
<td>physicians_study</td>
<td>sitting_room</td>
</tr>
<tr>
<td>study</td>
<td>tavern</td>
<td>temple</td>
<td>temple_church</td>
</tr>
<tr>
<td>temple_generic</td>
<td>temple_mosque</td>
<td>temple_scope</td>
<td>terrain</td>
</tr>
<tr>
<td>terrain_activity</td>
<td>terrain_scope</td>
<td>throne_room</td>
<td>throne_room_east</td>
</tr>
<tr>
<td>throne_room_india</td>
<td>throne_room_mediterranean</td>
<td>throne_room_scope</td>
<td>throne_room_tribal</td>
</tr>
<tr>
<td>throne_room_west</td>
<td>wilderness</td>
<td>wilderness_desert</td>
<td>wilderness_forest</td>
</tr>
<tr>
<td>wilderness_forest_pine</td>
<td>wilderness_mountains</td>
<td>wilderness_scope</td>
<td>wilderness_steppe</td>
</tr>
</tbody>
</table>
</div>
<h4 id="环境"><a href="#环境" class="headerlink" title="环境"></a>环境</h4><p>当选择好背景后，对应的环境也会被自动选择，但如果有必要可以自行指定覆盖。</p>
<div class="table-container">
<table>
<thead>
<tr>
<th>Environment</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td>environment_body</td>
<td>environment_council</td>
<td>environment_cw_east_main</td>
</tr>
<tr>
<td>environment_cw_east_spouse</td>
<td>environment_cw_east_throneroom_main</td>
<td>environment_cw_east_throneroom_spouse</td>
</tr>
<tr>
<td>environment_cw_india_main</td>
<td>environment_cw_india_spouse</td>
<td>environment_cw_india_throneroom_main</td>
</tr>
<tr>
<td>environment_cw_india_throneroom_spouse</td>
<td>environment_cw_mediterranean_main</td>
<td>environment_cw_mediterranean_spouse</td>
</tr>
<tr>
<td>environment_cw_mediterranean_throneroom_main</td>
<td>environment_cw_mediterranean_throneroom_spouse</td>
<td>environment_cw_tavern</td>
</tr>
<tr>
<td>environment_cw_tavern_spouse</td>
<td>environment_cw_tribal_main</td>
<td>environment_cw_tribal_spouse</td>
</tr>
<tr>
<td>environment_cw_west</td>
<td>environment_cw_west_spouse</td>
<td>environment_event_alley</td>
</tr>
<tr>
<td>environment_event_alley_day</td>
<td>environment_event_armory</td>
<td>environment_event_battlefield</td>
</tr>
<tr>
<td>environment_event_bedchamber</td>
<td>environment_event_church</td>
<td>environment_event_corridor_day</td>
</tr>
<tr>
<td>environment_event_courtyard</td>
<td>environment_event_desert</td>
<td>environment_event_docks</td>
</tr>
<tr>
<td>environment_event_dungeon</td>
<td>environment_event_farms</td>
<td>environment_event_feast</td>
</tr>
<tr>
<td>environment_event_forest</td>
<td>environment_event_forest_pine</td>
<td>environment_event_gallows</td>
</tr>
<tr>
<td>environment_event_garden</td>
<td>environment_event_genericcamp</td>
<td>environment_event_market_east</td>
</tr>
<tr>
<td>environment_event_market_tribal</td>
<td>environment_event_market_west</td>
<td>environment_event_mosque</td>
</tr>
<tr>
<td>environment_event_mountains</td>
<td>environment_event_sittingroom</td>
<td>environment_event_standard</td>
</tr>
<tr>
<td>environment_event_steppe</td>
<td>environment_event_study</td>
<td>environment_event_study_physician</td>
</tr>
<tr>
<td>environment_event_tavern</td>
<td>environment_event_temple</td>
<td>environment_event_throne_room_west</td>
</tr>
<tr>
<td>environment_frontend_east_heir</td>
<td>environment_frontend_east_main</td>
<td>environment_frontend_east_secondary</td>
</tr>
<tr>
<td>environment_frontend_india_heir</td>
<td>environment_frontend_india_main</td>
<td>environment_frontend_india_secondary</td>
</tr>
<tr>
<td>environment_frontend_mediterranean_heir</td>
<td>environment_frontend_mediterranean_main</td>
<td>environment_frontend_mediterranean_secondary</td>
</tr>
<tr>
<td>environment_frontend_tribal_heir</td>
<td>environment_frontend_tribal_main</td>
<td>environment_frontend_tribal_secondary</td>
</tr>
<tr>
<td>environment_frontend_west_heir</td>
<td>environment_frontend_west_main</td>
<td>environment_frontend_west_secondary</td>
</tr>
<tr>
<td>environment_head</td>
<td>environment_hud</td>
<td>environment_portrait_editor</td>
</tr>
<tr>
<td>environment_shoulders</td>
<td>environment_standard</td>
<td>environment_torso</td>
</tr>
<tr>
<td>environment_war_overview</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<h3 id="触发器"><a href="#触发器" class="headerlink" title="触发器"></a>触发器</h3><p>是使事件工作的附加内容。</p>
<h3 id="on-trigger-fail"><a href="#on-trigger-fail" class="headerlink" title="on_trigger_fail"></a>on_trigger_fail</h3><p>当触发器失败时运行该项。</p>
<h3 id="描述"><a href="#描述" class="headerlink" title="描述"></a>描述</h3><p>解释一个描述如何由多个字符串组成，例如<code>first_valid</code>和所有其他选项。</p>
<h3 id="即时模块"><a href="#即时模块" class="headerlink" title="即时模块"></a>即时模块</h3><p>该代码块中的内容会在事件触发时立即执行，甚至早于标题、描述和画像的渲染等等。一般用于设置变量和保存范围，或想要实现无玩家控制的功能影响。</p>
<h3 id="选项"><a href="#选项" class="headerlink" title="选项"></a>选项</h3><p>事件中的选项可以由用户选择。每个事件可以有任意数量的选项，包括无选项（一个典型的例子就是隐藏事件）。每个选项在主事件中如下定义：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">example.1 &#x3D; &#123;</span><br><span class="line">	[...]</span><br><span class="line">	option &#x3D; &#123;</span><br><span class="line">		# option info</span><br><span class="line">	&#125;</span><br><span class="line">	[...]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>下列表格介绍了<code>option</code>块中的可选关键字：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Description</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Yes</td>
<td>Points to a localization key for the event option button text.</td>
<td>name=example.1.a</td>
</tr>
<tr>
<td>(effects)</td>
<td>No</td>
<td>Any <a href="https://ck3.paradoxwikis.com/Effect" target="_blank" rel="noopener">effects</a> that the option may have can be written directly in the <code>option</code> block.</td>
<td>play_music_cue = mx_cue_banquet</td>
</tr>
<tr>
<td>trigger</td>
<td>No</td>
<td>Defines a <a href="https://ck3.paradoxwikis.com/Trigger" target="_blank" rel="noopener">trigger</a> that has to be fulfilled for the option to be valid and thus available to the user. Not to be confused with the <a href="https://ck3.paradoxwikis.com/Event_modding#Trigger" target="_blank" rel="noopener">main event trigger</a>.</td>
<td><code>trigger = { has_trait = shy }</code></td>
</tr>
<tr>
<td>show_as_unavailable</td>
<td>No</td>
<td>If the option is invalid, but this trigger is, the option will be  shown, but disabled. This behavior is also influenced by the  EVENT_OPTIONS_SHOWN_HIDE_UNAVAILABLE define.</td>
<td><code>show_as_unavailable = { short_term_gold &lt; medium_gold_value }</code></td>
</tr>
<tr>
<td>highlight_portrait</td>
<td>No</td>
<td>Highlights the event portrait of this character while this option is hovered. This is in addition to the automatic highlighting when  hovering an event option that has an effect that affects portrait  characters.</td>
<td>highlight_portrait = scope:custom</td>
</tr>
</tbody>
</table>
</div>
<h3 id="结束后"><a href="#结束后" class="headerlink" title="结束后"></a>结束后</h3><p>该代码块描述了事件发生后运行的内容。</p>
<h3 id="部件"><a href="#部件" class="headerlink" title="部件"></a>部件</h3><p>有什么类型的小部件。</p>
<h2 id="On-actions"><a href="#On-actions" class="headerlink" title="On_actions"></a>On_actions</h2><p>这部分wiki上是不完整的，先不详细写了。</p>
<p>该部分分为两类：On_actions from Code和On_actions Not from Code（即from script）</p>
<h2 id="策略"><a href="#策略" class="headerlink" title="策略"></a>策略</h2><p>这部分wiki也不完整，以后有了在写。</p>
<p>分为两部分：触发事件 和 技术与设计模式。</p>

      
    </div>
    
    
    

    

    

    
	
	<div>
		
		<div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>
		
	</div>
	
    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/%E6%B8%B8%E6%88%8F%E7%9B%B8%E5%85%B3/" rel="tag"><i class="fa fa-tag"></i> 游戏相关</a>
          
            <a href="/tags/ck3/" rel="tag"><i class="fa fa-tag"></i> ck3</a>
          
            <a href="/tags/mod/" rel="tag"><i class="fa fa-tag"></i> mod</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2020/10/31/Echarts%E7%9A%84%E9%85%8D%E7%BD%AE/" rel="next" title="Echarts的配置">
                <i class="fa fa-chevron-left"></i> Echarts的配置
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2020/11/08/ck3mod%E5%88%B6%E4%BD%9C%E7%AC%94%E8%AE%B0-5/" rel="prev" title="ck3mod制作笔记-5">
                ck3mod制作笔记-5 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            Overview
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/images/header.jpg"
                alt="Kun Li" />
            
              <p class="site-author-name" itemprop="name">Kun Li</p>
              <p class="site-description motion-element" itemprop="description">三月樱，六月雪，也望尘莫及</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
				<a href="/archives/">
              
                  <span class="site-state-item-count">54</span>
                  <span class="site-state-item-name">posts</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/categories/index.html">
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">categories</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/tags/index.html">
                  <span class="site-state-item-count">27</span>
                  <span class="site-state-item-name">tags</span>
                </a>
              </div>
            

          </nav>

          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/likun1208" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="likun@mail.bnu.edu.cn" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#事件模组"><span class="nav-number">1.</span> <span class="nav-text">事件模组</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#位置"><span class="nav-number">1.1.</span> <span class="nav-text">位置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#结构"><span class="nav-number">1.2.</span> <span class="nav-text">结构</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#ID和命名空间"><span class="nav-number">1.2.1.</span> <span class="nav-text">ID和命名空间</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#标识"><span class="nav-number">1.2.2.</span> <span class="nav-text">标识</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#画像"><span class="nav-number">1.3.</span> <span class="nav-text">画像</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#画像位置"><span class="nav-number">1.3.1.</span> <span class="nav-text">画像位置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#动画"><span class="nav-number">1.3.2.</span> <span class="nav-text">动画</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#主题"><span class="nav-number">1.3.3.</span> <span class="nav-text">主题</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#背景"><span class="nav-number">1.3.3.1.</span> <span class="nav-text">背景</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#环境"><span class="nav-number">1.3.3.2.</span> <span class="nav-text">环境</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#触发器"><span class="nav-number">1.3.4.</span> <span class="nav-text">触发器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#on-trigger-fail"><span class="nav-number">1.3.5.</span> <span class="nav-text">on_trigger_fail</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#描述"><span class="nav-number">1.3.6.</span> <span class="nav-text">描述</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#即时模块"><span class="nav-number">1.3.7.</span> <span class="nav-text">即时模块</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#选项"><span class="nav-number">1.3.8.</span> <span class="nav-text">选项</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#结束后"><span class="nav-number">1.3.9.</span> <span class="nav-text">结束后</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#部件"><span class="nav-number">1.3.10.</span> <span class="nav-text">部件</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#On-actions"><span class="nav-number">1.4.</span> <span class="nav-text">On_actions</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#策略"><span class="nav-number">1.5.</span> <span class="nav-text">策略</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2021</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Kun Li</span>

  
</div>


  <div class="powered-by">Powered by <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a></div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">Theme &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
          <span id="scrollpercent"><span>0</span>%</span>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.bootcss.com/mathjax/2.7.1/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

  
  <style>
    .copy-btn {
      display: inline-block;
      padding: 6px 12px;
      font-size: 13px;
      font-weight: 700;
      line-height: 20px;
      color: #333;
      white-space: nowrap;
      vertical-align: middle;
      cursor: pointer;
      background-color: #eee;
      background-image: linear-gradient(#fcfcfc, #eee);
      border: 1px solid #d5d5d5;
      border-radius: 3px;
      user-select: none;
      outline: 0;
    }

    .highlight-wrap .copy-btn {
      transition: opacity .3s ease-in-out;
      opacity: 0;
      padding: 2px 6px;
      position: absolute;
      right: 4px;
      top: 8px;
    }

    .highlight-wrap:hover .copy-btn,
    .highlight-wrap .copy-btn:focus {
      opacity: 1
    }

    .highlight-wrap {
      position: relative;
    }
  </style>
  
  <script>
    $('.highlight').each(function (i, e) {
      var $wrap = $('<div>').addClass('highlight-wrap')
      $(e).after($wrap)
      $wrap.append($('<button>').addClass('copy-btn').append('Copy').on('click', function (e) {
        var code = $(this).parent().find('.code').find('.line').map(function (i, e) {
          return $(e).text()
        }).toArray().join('\n')
        var ta = document.createElement('textarea')
        document.body.appendChild(ta)
        ta.style.position = 'absolute'
        ta.style.top = '0px'
        ta.style.left = '0px'
        ta.value = code
        ta.select()
        ta.focus()
        var result = document.execCommand('copy')
        document.body.removeChild(ta)
        
          if(result)$(this).text('Success')
          else $(this).text('Fail')
        
        $(this).blur()
      })).on('mouseleave', function (e) {
        var $b = $(this).find('.copy-btn')
        setTimeout(function () {
          $b.text('Copy')
        }, 300)
      }).append(e)
    })
  </script>

<script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"model":{"jsonPath":"/live2dw/assets/z16.model.json"},"display":{"position":"left","width":175,"height":350},"mobile":{"show":false},"log":false});</script></body>
</html>
<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/clicklove.js"></script>
